package com.wiretrack.circuit;

import java.util.ArrayList;
import java.util.List;

public class Round
{
	String id;
	String name;
	String description;
	boolean isRest = false;
	int length;
	public String speak = "";
	public List<Sound> sounds = new ArrayList<Sound>();
	public List<Flash> flashers = new ArrayList<Flash>();
	public List<Text> texts = new ArrayList<Text>();
	
	public Round(Round rnd)
	{
		this.id = rnd.id;
		this.name = rnd.name;
		this.description = rnd.description;
		this.isRest = rnd.isRest;
		this.length = rnd.length;
		this.speak = rnd.speak;
		this.sounds = rnd.sounds;
		this.flashers = rnd.flashers;
		this.texts = rnd.texts;
	}

	public String toString()
	{
		StringBuilder buf = new StringBuilder();
		buf.append("\nRound: " + id + " " + name);
		buf.append("\nlength in seconds: " + length);
		buf.append("\nDescription: " + description);
		buf.append("\nisRest: " + isRest);
		buf.append("\nSpeak: " + speak);

		if ( sounds != null )
		{
			for (Sound sound : sounds)
			{
				if ( sound != null )
					buf.append("\n" + sound.toString());
			}
		}

		return buf.toString();
	}
}
